//
//  JQFYNetworkTool.h
//  JQFY
//
//  Created by apple on 2017/8/28.
//  Copyright © 2017年 yannis. All rights reserved.
//

#import <AFNetworking/AFNetworking.h>

// 定义请求方式的格式
typedef NS_ENUM(NSUInteger, RequestMethod) {
    RequestMethodGet,
    RequestMethodPost
};
@interface JQFYNetworkTool : AFHTTPSessionManager

//网络工具单例
+(instancetype)sharedManager;

- (void)request:(RequestMethod)method urlString:(NSString *)urlString parameters:(id)parameters finished:(void(^)(id responseObject, NSError *error))finished;

//用第三方框架检查网络连接是否正常的方法  (用在登录判断中)
- (BOOL)isReachableByAFN;

@end
